package itsm.isperp.module.controller.license;

import javax.servlet.http.HttpServletRequest;

import itsm.isperp.framework.core.context.ContextHolder;
import itsm.isperp.framework.security.license.LicenseUtils;
import itsm.isperp.framework.utils.ServerUtils;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * 
 * 
 * 
 * @author lizx
 * @date 2014-2-28
 * @since 1.0
 * 
 */
@Controller
@RequestMapping("license")
public class LicenseController {

	@RequestMapping(value = "", method = RequestMethod.GET)
	public ModelAndView manage(String error) throws Exception {

		ModelAndView mv = new ModelAndView("license/manage");
		mv.addObject("mac", ServerUtils.getMac());

		return mv;

	}

	@RequestMapping(value = "infoView")
	public ModelAndView infoView(HttpServletRequest req) throws Exception {

		ModelAndView mv = new ModelAndView("license/infoView");

		mv.addObject("serverInfo", ContextHolder.SERVER_INFO);

		return mv;

	}
}
